package com.example.base;

public class TowWayLinkListTest2 {

    public static void main(String[] args) throws Exception {
        TowWayLinkList<Integer> list = new TowWayLinkList<>();
        list.insert(1);
        list.insert(2);
        list.insert(3);
        list.insert(4);
        for (Integer i : list) {
            System.out.print(i+" ");
        }
        System.out.println();
        System.out.println("--------------------");
        list.reverse();
        for (Integer i : list) {
            System.out.print(i+" ");
        }
    }
}
